Skip to content

Migrate Realtime API to GA protocol with Beta compatibility shim#189

Merged
jpr5 merged 5 commits into
mainfrom
blitz/gpt-realtime-2/integration
May 13, 2026
Merged

Migrate Realtime API to GA protocol with Beta compatibility shim#189
jpr5 merged 5 commits into
mainfrom
blitz/gpt-realtime-2/integration

Conversation

@jpr5
Copy link
Copy Markdown
Contributor

@jpr5 jpr5 commented May 13, 2026

Summary

  • Migrate aimock's Realtime API handler from deprecated Beta protocol to GA (event renames, nested session config, content type renames)
  • Add Beta compatibility shim via OpenAI-Beta: realtime=v1 header detection — thin translation layer in sendEvent() wrapper
  • Support 5 new GA models: gpt-realtime-2, gpt-realtime-1.5, gpt-realtime-mini, gpt-realtime-translate, gpt-realtime-whisper
  • Add translate/whisper session types with audio buffer handling and model+type validation
  • Add image input support (input_image content parts mapped to ChatMessage image_url format)
  • Add async function calling commentary phase (phase field on output_item events)
  • Add conversation.item.done event, response.cancel handling, endpoint type routing
  • Extend drift detection with GA model canary (5 models) and protocol probe (GA vs Beta normalization)
  • Update docs, DRIFT.md, competitive matrix

Test plan

  • 2965 tests pass (73 realtime integration tests, 66 conformance tests, drift tests gated behind API key)
  • TypeScript clean (tsc --noEmit)
  • Lint + format clean
  • CR converged in 2 rounds (7 agents × 2 = 14 review agents, 4 findings fixed)
  • Drift tests against live OpenAI API (requires API key)

🤖 Generated with Claude Code

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 13, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@189

commit: 38157e6

jpr5 added 5 commits May 13, 2026 12:20
… shim

GA-first design: handler emits GA event names natively, sendEvent()
wrapper translates back for Beta clients detected via OpenAI-Beta
header. New features: 5 GA models, translate/whisper session types,
image input, commentary phase, session validation, audio buffer
handling, response.cancel. Default model changed to gpt-realtime-2.
@jpr5 jpr5 force-pushed the blitz/gpt-realtime-2/integration branch from bc5a742 to 38157e6 Compare May 13, 2026 19:21
@jpr5 jpr5 merged commit 9cdb64b into main May 13, 2026
22 checks passed
@jpr5 jpr5 deleted the blitz/gpt-realtime-2/integration branch May 13, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant